<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/include/base.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<link rel="shortcut icon" href="img/favicon.png"/>
</head>
  <body>

  <!-- container section start -->
  <section id="container" class="">
      <%@include file="/WEB-INF/include/top.jsp"%>

      <%@include file="/WEB-INF/include/left.jsp"%>

      <!--main content start-->
      <section id="main-content" >
          <section class="wrapper">
		  <div class="row">
				<div class="col-lg-12">
					<ol class="breadcrumb">
						<li><i class="fa fa-home"></i><a href="index.jsp">人员管理</a></li>
						<li id="personMessageLabel"><i class="fa fa-table"></i>修改人员</li>
					</ol>
					
				</div>
			</div>

              <div class="row" align="center" style="margin:0 auto">
                  <div class="col-lg-12">
                      <section class="">
                        
                         <form class="form-horizontal"  id="personForm">
			<%@include file="/WEB-INF/include/personMessage.jsp"%>

			<div style="margin-left: 600px">
				<input id="savePerson" data-toggle="modal" class="btn btn-primary" type="submit" value="提交信息"/>
				<!-- <input id="resetPerson" data-toggle="modal" class="btn btn-warning" type="reset" value="清空信息"/> -->
				<input data-toggle="modal" class="btn btn-danger" type="button" onclick="javascript:history.back()" value="返回"/>
			
			</div>
			<script type="text/javascript">
				$(function(){
					
					//保存用户消息
					$("#savePerson").click(function(){
						var user="id="+$("#userIdInput").val()+"&"+$("#personForm").serialize();
						//验证用户名密码是否为空  密码 电话号码 手机 是否符合规则
						//ajax提交
						$.ajax({
							url:"${APP_PATH}/person",
							type:"PUT",
							data:user,
							success:function(result){
								 if(result.code == 200){
									 //显示失败消息  失败
										alert(result.extend.msg);
									}
								window.location.href="${APP_PATH}/person/person-list.jsp";
							}
						});
					});
				})
			</script>	
			<c:set value="${currentPage }" var="target" scope="session"></c:set>
			
		</form>
                  
              
          </section>
      </section>
      <!--main content end-->
  </section>
  <!-- container section end -->
    <!-- javascripts -->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <!-- nicescroll -->
    <script src="js/jquery.scrollTo.min.js"></script>
    <script src="js/jquery.nicescroll.js" type="text/javascript"></script>
    <!--custome script for all page-->
    <script src="js/scripts.js"></script>


  </body>
</html>
